<!DOCTYPE html><html><head>
      <title>&#x5F00;&#x53D1;&#x677F;&#x73AF;&#x5883;&#x7B14;&#x8BB0;</title>
      <meta charset="utf-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      
      <link rel="stylesheet" href="file:///c:\Users\Sugar\.vscode\extensions\shd101wyy.markdown-preview-enhanced-0.5.16\node_modules\@shd101wyy\mume\dependencies\katex\katex.min.css">
      <style>
      /**
 * prism.js Github theme based on GitHub's theme.
 * @author Sam Clarke
 */
code[class*="language-"],
pre[class*="language-"] {
  color: #333;
  background: none;
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  word-wrap: normal;
  line-height: 1.4;

  -moz-tab-size: 8;
  -o-tab-size: 8;
  tab-size: 8;

  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
}

/* Code blocks */
pre[class*="language-"] {
  padding: .8em;
  overflow: auto;
  /* border: 1px solid #ddd; */
  border-radius: 3px;
  /* background: #fff; */
  background: #f5f5f5;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
  padding: .1em;
  border-radius: .3em;
  white-space: normal;
  background: #f5f5f5;
}

.token.comment,
.token.blockquote {
  color: #969896;
}

.token.cdata {
  color: #183691;
}

.token.doctype,
.token.punctuation,
.token.variable,
.token.macro.property {
  color: #333;
}

.token.operator,
.token.important,
.token.keyword,
.token.rule,
.token.builtin {
  color: #a71d5d;
}

.token.string,
.token.url,
.token.regex,
.token.attr-value {
  color: #183691;
}

.token.property,
.token.number,
.token.boolean,
.token.entity,
.token.atrule,
.token.constant,
.token.symbol,
.token.command,
.token.code {
  color: #0086b3;
}

.token.tag,
.token.selector,
.token.prolog {
  color: #63a35c;
}

.token.function,
.token.namespace,
.token.pseudo-element,
.token.class,
.token.class-name,
.token.pseudo-class,
.token.id,
.token.url-reference .token.variable,
.token.attr-name {
  color: #795da3;
}

.token.entity {
  cursor: help;
}

.token.title,
.token.title .token.punctuation {
  font-weight: bold;
  color: #1d3e81;
}

.token.list {
  color: #ed6a43;
}

.token.inserted {
  background-color: #eaffea;
  color: #55a532;
}

.token.deleted {
  background-color: #ffecec;
  color: #bd2c00;
}

.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}


/* JSON */
.language-json .token.property {
  color: #183691;
}

.language-markup .token.tag .token.punctuation {
  color: #333;
}

/* CSS */
code.language-css,
.language-css .token.function {
  color: #0086b3;
}

/* YAML */
.language-yaml .token.atrule {
  color: #63a35c;
}

code.language-yaml {
  color: #183691;
}

/* Ruby */
.language-ruby .token.function {
  color: #333;
}

/* Markdown */
.language-markdown .token.url {
  color: #795da3;
}

/* Makefile */
.language-makefile .token.symbol {
  color: #795da3;
}

.language-makefile .token.variable {
  color: #183691;
}

.language-makefile .token.builtin {
  color: #0086b3;
}

/* Bash */
.language-bash .token.keyword {
  color: #0086b3;
}

/* highlight */
pre[data-line] {
  position: relative;
  padding: 1em 0 1em 3em;
}
pre[data-line] .line-highlight-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  background-color: transparent;
  display: block;
  width: 100%;
}

pre[data-line] .line-highlight {
  position: absolute;
  left: 0;
  right: 0;
  padding: inherit 0;
  margin-top: 1em;
  background: hsla(24, 20%, 50%,.08);
  background: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));
  pointer-events: none;
  line-height: inherit;
  white-space: pre;
}

pre[data-line] .line-highlight:before, 
pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-start);
  position: absolute;
  top: .4em;
  left: .6em;
  min-width: 1em;
  padding: 0 .5em;
  background-color: hsla(24, 20%, 50%,.4);
  color: hsl(24, 20%, 95%);
  font: bold 65%/1.5 sans-serif;
  text-align: center;
  vertical-align: .3em;
  border-radius: 999px;
  text-shadow: none;
  box-shadow: 0 1px white;
}

pre[data-line] .line-highlight[data-end]:after {
  content: attr(data-end);
  top: auto;
  bottom: .4em;
}html body{font-family:"Helvetica Neue",Helvetica,"Segoe UI",Arial,freesans,sans-serif;font-size:16px;line-height:1.6;color:#333;background-color:#fff;overflow:initial;box-sizing:border-box;word-wrap:break-word}html body>:first-child{margin-top:0}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{line-height:1.2;margin-top:1em;margin-bottom:16px;color:#000}html body h1{font-size:2.25em;font-weight:300;padding-bottom:.3em}html body h2{font-size:1.75em;font-weight:400;padding-bottom:.3em}html body h3{font-size:1.5em;font-weight:500}html body h4{font-size:1.25em;font-weight:600}html body h5{font-size:1.1em;font-weight:600}html body h6{font-size:1em;font-weight:600}html body h1,html body h2,html body h3,html body h4,html body h5{font-weight:600}html body h5{font-size:1em}html body h6{color:#5c5c5c}html body strong{color:#000}html body del{color:#5c5c5c}html body a:not([href]){color:inherit;text-decoration:none}html body a{color:#08c;text-decoration:none}html body a:hover{color:#00a3f5;text-decoration:none}html body img{max-width:100%}html body>p{margin-top:0;margin-bottom:16px;word-wrap:break-word}html body>ul,html body>ol{margin-bottom:16px}html body ul,html body ol{padding-left:2em}html body ul.no-list,html body ol.no-list{padding:0;list-style-type:none}html body ul ul,html body ul ol,html body ol ol,html body ol ul{margin-top:0;margin-bottom:0}html body li{margin-bottom:0}html body li.task-list-item{list-style:none}html body li>p{margin-top:0;margin-bottom:0}html body .task-list-item-checkbox{margin:0 .2em .25em -1.8em;vertical-align:middle}html body .task-list-item-checkbox:hover{cursor:pointer}html body blockquote{margin:16px 0;font-size:inherit;padding:0 15px;color:#5c5c5c;background-color:#f0f0f0;border-left:4px solid #d6d6d6}html body blockquote>:first-child{margin-top:0}html body blockquote>:last-child{margin-bottom:0}html body hr{height:4px;margin:32px 0;background-color:#d6d6d6;border:0 none}html body table{margin:10px 0 15px 0;border-collapse:collapse;border-spacing:0;display:block;width:100%;overflow:auto;word-break:normal;word-break:keep-all}html body table th{font-weight:bold;color:#000}html body table td,html body table th{border:1px solid #d6d6d6;padding:6px 13px}html body dl{padding:0}html body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:bold}html body dl dd{padding:0 16px;margin-bottom:16px}html body code{font-family:Menlo,Monaco,Consolas,'Courier New',monospace;font-size:.85em !important;color:#000;background-color:#f0f0f0;border-radius:3px;padding:.2em 0}html body code::before,html body code::after{letter-spacing:-0.2em;content:"\00a0"}html body pre>code{padding:0;margin:0;font-size:.85em !important;word-break:normal;white-space:pre;background:transparent;border:0}html body .highlight{margin-bottom:16px}html body .highlight pre,html body pre{padding:1em;overflow:auto;font-size:.85em !important;line-height:1.45;border:#d6d6d6;border-radius:3px}html body .highlight pre{margin-bottom:0;word-break:normal}html body pre code,html body pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}html body pre code:before,html body pre tt:before,html body pre code:after,html body pre tt:after{content:normal}html body p,html body blockquote,html body ul,html body ol,html body dl,html body pre{margin-top:0;margin-bottom:16px}html body kbd{color:#000;border:1px solid #d6d6d6;border-bottom:2px solid #c7c7c7;padding:2px 4px;background-color:#f0f0f0;border-radius:3px}@media print{html body{background-color:#fff}html body h1,html body h2,html body h3,html body h4,html body h5,html body h6{color:#000;page-break-after:avoid}html body blockquote{color:#5c5c5c}html body pre{page-break-inside:avoid}html body table{display:table}html body img{display:block;max-width:100%;max-height:100%}html body pre,html body code{word-wrap:break-word;white-space:pre}}.markdown-preview{width:100%;height:100%;box-sizing:border-box}.markdown-preview .pagebreak,.markdown-preview .newpage{page-break-before:always}.markdown-preview pre.line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}.markdown-preview pre.line-numbers>code{position:relative}.markdown-preview pre.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:1em;font-size:100%;left:0;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.markdown-preview pre.line-numbers .line-numbers-rows>span{pointer-events:none;display:block;counter-increment:linenumber}.markdown-preview pre.line-numbers .line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}.markdown-preview .mathjax-exps .MathJax_Display{text-align:center !important}.markdown-preview:not([for="preview"]) .code-chunk .btn-group{display:none}.markdown-preview:not([for="preview"]) .code-chunk .status{display:none}.markdown-preview:not([for="preview"]) .code-chunk .output-div{margin-bottom:16px}.scrollbar-style::-webkit-scrollbar{width:8px}.scrollbar-style::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}.scrollbar-style::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode]){position:relative;width:100%;height:100%;top:0;left:0;margin:0;padding:0;overflow:auto}html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{position:relative;top:0}@media screen and (min-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em calc(50% - 457px + 2em)}}@media screen and (max-width:914px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode]) .markdown-preview{font-size:14px !important;padding:1em}}@media print{html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{display:none}}html body[for="html-export"]:not([data-presentation-mode]) #sidebar-toc-btn{position:fixed;bottom:8px;left:8px;font-size:28px;cursor:pointer;color:inherit;z-index:99;width:32px;text-align:center;opacity:.4}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] #sidebar-toc-btn{opacity:1}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc{position:fixed;top:0;left:0;width:300px;height:100%;padding:32px 0 48px 0;font-size:14px;box-shadow:0 0 4px rgba(150,150,150,0.33);box-sizing:border-box;overflow:auto;background-color:inherit}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar{width:8px}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-track{border-radius:10px;background-color:transparent}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc::-webkit-scrollbar-thumb{border-radius:5px;background-color:rgba(150,150,150,0.66);border:4px solid rgba(150,150,150,0.66);background-clip:content-box}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc a{text-decoration:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{padding:0 1.6em;margin-top:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc li{margin-bottom:.8em}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .md-sidebar-toc ul{list-style-type:none}html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{left:300px;width:calc(100% -  300px);padding:2em calc(50% - 457px -  150px);margin:0;box-sizing:border-box}@media screen and (max-width:1274px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{padding:2em}}@media screen and (max-width:450px){html body[for="html-export"]:not([data-presentation-mode])[html-show-sidebar-toc] .markdown-preview{width:100%}}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .markdown-preview{left:50%;transform:translateX(-50%)}html body[for="html-export"]:not([data-presentation-mode]):not([html-show-sidebar-toc]) .md-sidebar-toc{display:none}
/* Please visit the URL below for more information: */
/*   https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */

      </style>
    </head>
    <body for="html-export">
      <div class="mume markdown-preview  ">
      <h3 class="mume-header" id="%E5%BC%80%E5%8F%91%E6%9D%BF%E5%BC%80%E5%8F%91%E7%AC%94%E8%AE%B0">&#x5F00;&#x53D1;&#x677F;&#x5F00;&#x53D1;&#x7B14;&#x8BB0;</h3>

<h3 class="mume-header" id="1%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BA">1.&#x73AF;&#x5883;&#x642D;&#x5EFA;</h3>

<p>1.Ubuntu&#x5F00;&#x53D1;&#x73AF;&#x5883;&#xFF08;&#x8D1F;&#x8D23;&#x9879;&#x76EE;&#x5EFA;&#x7ACB; &#x8C03;&#x8BD5; &#x7F16;&#x8BD1;&#xFF09;<br>
2.Windows&#x5F00;&#x53D1;&#x73AF;&#x5883; &#xFF08;&#x8D1F;&#x8D23;&#x771F;&#x673A;&#x70E7;&#x5F55; &#x4E32;&#x53E3;&#x8C03;&#x8BD5;&#xFF09;</p>
<hr>
<h4 class="mume-header" id="ubuntu%E7%8E%AF%E5%A2%83">Ubuntu&#x73AF;&#x5883;</h4>

<table>
<thead>
<tr>
<th>Ubuntu&#x865A;&#x62DF;&#x786C;&#x4EF6;</th>
<th>&#x63A8;&#x8350;&#x914D;&#x7F6E;</th>
</tr>
</thead>
<tbody>
<tr>
<td>CPU</td>
<td>4&#x6838;</td>
</tr>
<tr>
<td>&#x5185;&#x5B58;</td>
<td>6G</td>
</tr>
<tr>
<td>&#x663E;&#x5B58;</td>
<td>128M&#xFF08;&#x5982;&#x679C;&#x4F60;&#x80FD;&#x66F4;&#x5927;&#xFF09;</td>
</tr>
<tr>
<td>&#x786C;&#x76D8;</td>
<td>70G&#x4EE5;&#x4E0A; &#xFF08;&#x5EFA;&#x8BAE;&#x79FB;&#x52A8;&#x786C;&#x76D8;&#xFF09;</td>
</tr>
<tr>
<td>&#x5171;&#x4EAB;&#x6587;&#x4EF6;&#x5939;</td>
<td>&#x6302;&#x8F7D;</td>
</tr>
<tr>
<td>&#x5171;&#x4EAB;&#x7C98;&#x8D34;&#x677F;</td>
<td>&#x53CC;&#x5411;</td>
</tr>
<tr>
<td>&#x5171;&#x4EAB;&#x62D6;&#x62FD;</td>
<td>&#x53CC;&#x5411;</td>
</tr>
</tbody>
</table>
<h5 class="mume-header" id="%E8%99%9A%E6%8B%9F%E6%9C%BA%E5%BC%80%E5%90%AFroot%E5%8F%82%E8%80%83">&#x865A;&#x62DF;&#x673A;&#x5F00;&#x542F;root&#xFF08;&#x53C2;&#x8003;&#xFF09;</h5>

<pre class="language-text">&#x6253;&#x5F00;&#x7EC8;&#x7AEF;&#x8F93;&#x5165;&#xFF1A;sudo passwd

Password: &lt;--- &#x8F93;&#x5165;&#x4F60;&#x5F53;&#x524D;&#x7528;&#x6237;&#x7684;&#x5BC6;&#x7801;

Enter new UNIX password: &lt;--- &#x65B0;&#x7684;Root&#x7528;&#x6237;&#x5BC6;&#x7801;

Retype new UNIX password: &lt;--- &#x91CD;&#x590D;&#x65B0;&#x7684;Root&#x7528;&#x6237;&#x5BC6;&#x7801;

passwd&#xFF1A;password updated successfully

&#x6210;&#x529F;&#x4E4B;&#x540E; su - root

&#x8F93;&#x5165;&#x521A;&#x521A;&#x8BBE;&#x7F6E;&#x7684;root&#x5BC6;&#x7801;&#x540E;&#xFF0C;&#x5373;&#x53EF;&#x6210;&#x529F;&#x5207;&#x6362;&#x5230;root&#x7528;&#x6237;&#x3002;
</pre>
<h4 class="mume-header" id="%E5%BC%80%E5%A7%8B%E9%85%8D%E7%BD%AEubuntu%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83">&#x5F00;&#x59CB;&#x914D;&#x7F6E;Ubuntu&#x7F16;&#x8BD1;&#x73AF;&#x5883;</h4>

<p>&#x5B98;&#x65B9;&#x6587;&#x6863;&#x5730;&#x5740;&#xFF1A;<a href="https://device.harmonyos.com/cn/docs/start/introduce/oem_quickstart_3516_environment-0000001054501981#ZH-CN_TOPIC_0000001054501981__section182916865219">https://device.harmonyos.com/cn/docs/start/introduce/oem_quickstart_3516_environment-0000001054501981#ZH-CN_TOPIC_0000001054501981__section182916865219</a></p>
<p>&#x6211;&#x4E2A;&#x4EBA;&#x4E0D;&#x559C;&#x6B22;Docker &#x9009;&#x62E9;<br>
&#x3010;&#x5B89;&#x88C5;Linux&#x7F16;&#x8BD1;&#x73AF;&#x5883;&#xFF08;&#x65B9;&#x6CD5;&#x4E8C;&#xFF1A;&#x5B89;&#x88C5;&#x5305;&#x65B9;&#x5F0F;&#xFF09;&#x3011;</p>
<p>&#x56E0;&#x4E3A;&#x6211;&#x4EEC;&#x662F;&#x672C;&#x5730;&#x865A;&#x62DF;&#x673A;&#xFF0C;&#x76F4;&#x63A5;&#x8FD9;&#x91CC;&#x5F00;&#x59CB;<br>
&#x3010;&#x5C06;Linux shell&#x6539;&#x4E3A;bash&#x3011;</p>
<p>&#x4E00;&#x76F4;&#x5230;&#x7ED3;&#x675F;&#x3002;</p>
<h4 class="mume-header" id="%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9%E9%9D%9E%E5%B8%B8%E9%87%8D%E8%A6%81">&#x6CE8;&#x610F;&#x4E8B;&#x9879;(&#x975E;&#x5E38;&#x91CD;&#x8981;)&#xFF1A;</h4>

<p>1.&#x66F4;&#x6362;Ubuntu&#x955C;&#x50CF;&#x6E90;&#xFF0C;&#x7528;apt-get&#x65B9;&#x6CD5;&#x80FD;&#x66F4;&#x65B9;&#x4FBF;&#x5B89;&#x88C5;Python&#xFF08;Ubuntu20&#x81EA;&#x5E26;Python3.8&#xFF09;</p>
<p>2.&#x4ECE;&#x3010;&#x5B89;&#x88C5;gn&#x3011;&#x5F00;&#x59CB;&#x4E0B;&#x9762;&#x6BCF;&#x4E00;&#x6B65;&#xFF0C;&#x9700;&#x8981;&#x4E0B;&#x8F7D;&#x6587;&#x4EF6;&#x5E76;&#x914D;&#x7F6E;bashrc&#x6587;&#x6863;&#xFF0C;&#x4E00;&#x5B9A;&#x8981;&#x8BA9; root &#x4E0E; &#x865A;&#x62DF;&#x673A;&#x767B;&#x5F55;&#x8D26;&#x6237;&#x90FD;&#x914D;&#x7F6E;</p>
<p>3.root &#x7684; ~/ &#x76EE;&#x5F55;&#x4E0E;&#x767B;&#x5F55;&#x8D26;&#x6237;&#x7684; ~/ &#x662F;&#x4E0D;&#x4E00;&#x6837;&#x7684;&#x3002;&#x88C5;&#x4E24;&#x904D;</p>
<h4 class="mume-header" id="%E5%BC%80%E5%A7%8B%E9%85%8D%E7%BD%AEubuntu%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83-1">&#x5F00;&#x59CB;&#x914D;&#x7F6E;Ubuntu&#x7F16;&#x8BD1;&#x73AF;&#x5883;</h4>

<p>&#x5B98;&#x65B9;&#x6587;&#x6863;&#x5730;&#x5740;&#xFF1A;<a href="https://device.harmonyos.com/cn/docs/ide/user-guides/install_ubuntu-0000001072959308">https://device.harmonyos.com/cn/docs/ide/user-guides/install_ubuntu-0000001072959308</a></p>
<pre class="language-text">&#x5B89;&#x88C5;Visual Studio Code
&#x5B89;&#x88C5;Python
&#x5B89;&#x88C5;Node.js
&#x5B89;&#x88C5;hpm
&#x5B89;&#x88C5;DevEco Device Tool&#x63D2;&#x4EF6;
</pre>
<p>C/C++&#x3001;CodeLLDB&#x4E24;&#x4E2A;&#x63D2;&#x4EF6;&#x5EFA;&#x8BAE;&#x79BB;&#x7EBF;&#x5B89;&#x88C5;</p>
<p>&#x5B98;&#x65B9;&#x5730;&#x5740;&#xFF1A;<a href="https://device.harmonyos.com/cn/docs/ide/user-guides/offline_plugin_install-0000001074376846">https://device.harmonyos.com/cn/docs/ide/user-guides/offline_plugin_install-0000001074376846</a></p>
<hr>
<h4 class="mume-header" id="windows%E7%8E%AF%E5%A2%83">Windows&#x73AF;&#x5883;</h4>

<p>&#x76F4;&#x63A5;&#x5B89;&#x88C5;DevEco Device Tool</p>
<p>&#x5B98;&#x65B9;&#x6587;&#x6863;&#x5730;&#x5740;&#xFF1A;<a href="https://device.harmonyos.com/cn/docs/ide/user-guides/install_windows-0000001050164976">https://device.harmonyos.com/cn/docs/ide/user-guides/install_windows-0000001050164976</a></p>
<hr>
<p>&#x5F53;&#x4F60;&#x80FD;&#x5728;Ubuntu Windows&#x90FD;&#x6253;&#x5F00;&#x643A;&#x5E26;DevEco Device Tool&#x63D2;&#x4EF6;&#x7684;Vscode&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x7EE7;&#x7EED;&#x8FDB;&#x884C;&#x4E0B;&#x4E00;&#x6B65;&#x3002;</p>
<hr>
<h3 class="mume-header" id="2%E5%88%9B%E5%BB%BA%E6%96%B0%E5%B7%A5%E7%A8%8B-%E7%BC%96%E8%AF%91%E6%B7%B1%E5%9D%91%E5%BC%80%E5%A7%8B">2.&#x521B;&#x5EFA;&#x65B0;&#x5DE5;&#x7A0B; / &#x7F16;&#x8BD1;&#xFF08;&#x6DF1;&#x5751;&#x5F00;&#x59CB;&#xFF09;</h3>

<h4 class="mume-header" id="ide%E5%8F%AF%E4%BB%A5%E5%88%9B%E5%BB%BA%E4%BD%86%E4%B8%8D%E8%83%BD%E5%BC%80%E5%8F%91">IDE&#x53EF;&#x4EE5;&#x521B;&#x5EFA;&#x4F46;&#x4E0D;&#x80FD;&#x5F00;&#x53D1;</h4>

<pre class="language-text">&#x867D;&#x7136;&#x4E0D;&#x80FD;&#x5F00;&#x53D1;&#xFF0C;&#x4F46;&#x8FD8;&#x662F;&#x8981;&#x6309;&#x4E0B;&#x9762;&#x6587;&#x6863;&#x7684;&#x65B9;&#x5F0F;&#x5B89;&#x88C5;&#x5E76;&#x7F16;&#x8BD1;&#x4E00;&#x6B21;&#xFF01;
</pre>
<p>&#x8BE5;&#x64CD;&#x4F5C;&#x4E00;&#x5B9A;&#x662F;&#x5728;Ubuntu&#x7684; DevEco Device Tool &#x4E2D;&#x64CD;&#x4F5C;&#xFF0C;&#x53EA;&#x6709;Linux&#x7CFB;&#x7EDF;&#x624D;&#x80FD;&#x5B89;&#x88C5;&#x548C;&#x7F16;&#x8BD1;&#x3002;<br>
&#x5B98;&#x65B9;&#x6587;&#x6863;&#x5730;&#x5740;&#xFF1A;<a href="https://device.harmonyos.com/cn/docs/ide/user-guides/create_project-0000001072200151">https://device.harmonyos.com/cn/docs/ide/user-guides/create_project-0000001072200151</a></p>
<h4 class="mume-header" id="repo%E6%BA%90%E7%A0%81%E6%89%8D%E8%83%BD%E5%BC%80%E5%8F%91">repo&#x6E90;&#x7801;&#x624D;&#x80FD;&#x5F00;&#x53D1;</h4>

<p>&#x5B98;&#x65B9;&#x6587;&#x6863;&#xFF1A;<a href="https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_first_example-0000001051610926">https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_first_example-0000001051610926</a></p>
<p>&#x6309;&#x7167;&#x8FD9;&#x91CC;&#x7684;&#x65B9;&#x5F0F; &#xFF0C;&#x4EC5;&#x83B7;&#x53D6;&#x6E90;&#x7801; &#x5E76; &#x7F16;&#x8BD1;</p>
<h5 class="mume-header" id="%E6%B3%A8%E6%84%8F%E4%BA%8B%E9%A1%B9%E9%9D%9E%E5%B8%B8%E9%87%8D%E8%A6%81-1">&#x6CE8;&#x610F;&#x4E8B;&#x9879;&#xFF08;&#x975E;&#x5E38;&#x91CD;&#x8981;&#xFF09;&#xFF1A;</h5>

<p>1.repo&#x6E90;&#x7801;&#x9700;&#x8981;&#x7528;root &#x547D;&#x4EE4;&#x884C;&#x64CD;&#x4F5C;&#x7F16;&#x8BD1;<br>
2.vscode&#x4E2D;&#x4E5F;&#x521B;&#x5EFA;&#x5E76;&#x7F16;&#x8BD1;&#xFF0C;&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x73B0;&#x5728;&#x6709;&#x4E24;&#x5957;&#xFF0C;&#x6CA1;&#x6709;&#x9519;&#x662F;&#x4E24;&#x5957;&#x3002;</p>
<p>&#x56E0;&#x4E3A;&#x53EA;&#x6709;repo&#x6E90;&#x7801;&#x7F16;&#x8BD1;&#x540E;&#x7684;out&#x955C;&#x50CF;&#xFF0C;&#x624D;&#x80FD;&#x4E0E;&#x4E32;&#x53E3;&#x56DE;&#x663E;&#xFF01;&#xFF01;&#xFF01;<br>
&#x6B64;&#x5904;&#x4EE5;&#x540E;&#x80AF;&#x5B9A;&#x4F1A;&#x4FEE;&#x6539;&#xFF0C;&#x4F46;&#x662F;&#x76EE;&#x524D;hpm&#x4E0B;&#x8F7D;&#x7684;&#x5B98;&#x65B9;&#x7248;&#x672C;&#xFF0C;&#x4E0D;&#x80FD;&#x7F16;&#x8BD1;debug&#x7248;&#x672C;&#xFF01;</p>
<p>&#x6240;&#x4EE5;&#x4E0B;&#x4E00;&#x6B65;&#xFF0C;&#x628A;repo&#x7F16;&#x8BD1;&#x540E;&#x591A;&#x51FA;&#x6765;&#x7684;out&#x8986;&#x76D6;<br>
DevEco Device Tool &#x4E2D;&#x7684;out&#x5185;&#x5BB9;&#xFF0C;&#x7136;&#x540E;&#x7528;windows&#x6253;&#x5F00;&#x8FD9;&#x4E2A;&#x9879;&#x76EE;</p>
<p>&#x7EE7;&#x7EED;&#x4E0B;&#x4E00;&#x6B65;</p>
<h3 class="mume-header" id="3%E7%83%A7%E5%BD%95%E4%B8%8E%E8%BF%90%E8%A1%8C">3.&#x70E7;&#x5F55;&#x4E0E;&#x8FD0;&#x884C;</h3>

<p>&#x5B98;&#x65B9;&#x6587;&#x6863;&#xFF1A;<a href="https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_first_example-0000001051610926#ZH-CN_TOPIC_0000001052906247__section08153912587">https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_first_example-0000001051610926#ZH-CN_TOPIC_0000001052906247__section08153912587</a></p>
<p>&#x63A8;&#x8350;&#x7528;&#x7F51;&#x53E3;&#x70E7;&#x5F55;&#xFF0C;&#x7F51;&#x7EBF;&#x5C06;&#x677F;&#x5B50;&#x4E0E;&#x4E3B;&#x673A;&#x8FDE;&#x63A5;&#xFF0C;&#x5E76;&#x4FEE;&#x6539;&#x7F51;&#x7EBF;&#x7F51;&#x53E3;&#x3010;&#x4EE5;&#x592A;&#x7F51;&#x3011;ipv4&#x5730;&#x5740;&#x5230;192.168.1.x&#x7F51;&#x6BB5;&#xFF01;&#xFF01;&#xFF01;</p>
<p>&#x6B64;&#x5904;&#x975E;&#x5E38;&#x91CD;&#x8981;&#xFF01;&#xFF01;</p>
<p>&#x522B;&#x8DDF;&#x6211;&#x4E00;&#x6837;&#x4E8C;&#x516E;&#x516E;&#x7684;&#xFF0C;&#x4FEE;&#x6539;&#x4E86;&#x534A;&#x5929;Wi-fi&#x7684;IP&#xFF0C;&#x6574;&#x7684;&#x81EA;&#x5DF1;&#x5B9B;&#x5982;&#x4E2A;&#x667A;&#x969C;&#x3002;</p>
<p>&#x7136;&#x540E;&#x6CE8;&#x610F;&#xFF0C;&#x5148;&#x5237;fastboot&#xFF0C;&#x5982;&#x679C;&#x9047;&#x5230;&#x677F;&#x5B50;&#x7F51;&#x53E3;&#x706F;&#x4E0D;&#x4EAE;&#xFF0C;&#x5C31;&#x5148;&#x7528;&#x4E32;&#x53E3;&#x628A;boot&#x5237;&#x4E86;&#x3002;<br>
&#x7136;&#x540E;&#x786E;&#x8BA4;&#x7F51;&#x53E3;&#x706F;&#x4EAE;&#xFF0C;&#x7136;&#x540E;&#x7EE7;&#x7EED;&#x5237;&#x955C;&#x50CF;&#x3002;</p>
<h3 class="mume-header" id="4-%E9%95%9C%E5%83%8F%E8%BF%90%E8%A1%8C">4&#xB7; &#x955C;&#x50CF;&#x8FD0;&#x884C;</h3>

<p>&#x5B98;&#x65B9;&#x6587;&#x6863;&#xFF1A;<a href="https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_first_example-0000001051610926#ZH-CN_TOPIC_0000001052906247__section08153912587">https://device.harmonyos.com/cn/docs/start/introduce/oem_camera_start_first_example-0000001051610926#ZH-CN_TOPIC_0000001052906247__section08153912587</a></p>
<p>&#xFF08;&#x5BF9;&#xFF0C;&#x6CA1;&#x9519;&#xFF0C;&#x5C31;&#x662F;&#x8FD9;&#x51E0;&#x7BC7;&#x6587;&#x6863;&#x6765;&#x56DE;&#x7FFB;&#x3002;&#x5927;C&#xFF09;</p>
<p>&#x8BB0;&#x5F55;&#x8868;&#x683C;&#x4E2D;&#x7684;&#x6307;&#x4EE4;&#xFF0C;&#x53EA;&#x8981;&#x4F60;&#x662F;Hi3516&#x5B98;&#x65B9;&#x7248;&#x672C;&#xFF0C;&#x5C31;&#x4E0D;&#x7528;&#x6539;</p>
<pre class="language-text">setenv bootcmd &quot;mmc read 0x0 0x80000000 0x800 0x4800; go 0x80000000&quot;;

// &#x8BFB;&#x53D6;FLASH&#x8D77;&#x59CB;&#x5730;&#x5740;&#x4E3A;0x800&#xFF08;&#x5355;&#x4F4D;&#x4E3A;512B&#xFF0C;&#x5373;1MB&#xFF09;&#xFF0C;&#x5927;&#x5C0F;&#x4E3A;0x4800&#xFF08;&#x5355;&#x4F4D;&#x4E3A;512B&#xFF0C;&#x5373;9MB&#xFF09;&#x7684;&#x5185;&#x5BB9;&#x5230;0x80000000&#x7684;&#x5185;&#x5B58;&#x5730;&#x5740;&#xFF0C;&#x8BE5;&#x5927;&#x5C0F;&#xFF08;9MB&#xFF09;&#x4E0E;IDE&#x4E2D;&#x6240;&#x586B;&#x5199;OHOS_Image.bin&#x6587;&#x4EF6;&#x5927;&#x5C0F;&#x5FC5;&#x987B;&#x76F8;&#x540C;&#x3002;

setenv bootargs &quot;console=ttyAMA0,115200n8 root=emmc fstype=vfat rootaddr=10M rootsize=15M rw&quot;;

// &#x8868;&#x793A;&#x8BBE;&#x7F6E;&#x542F;&#x52A8;&#x53C2;&#x6570;&#xFF0C;&#x8F93;&#x51FA;&#x6A21;&#x5F0F;&#x4E3A;&#x4E32;&#x53E3;&#x8F93;&#x51FA;&#xFF0C;&#x6CE2;&#x7279;&#x7387;&#x4E3A;115200&#xFF0C;&#x6570;&#x636E;&#x4F4D;8&#xFF0C;rootfs&#x6302;&#x8F7D;&#x4E8E;emmc&#x5668;&#x4EF6;&#xFF0C;&#x6587;&#x4EF6;&#x7CFB;&#x7EDF;&#x7C7B;&#x578B;&#x4E3A;vfat&#xFF0C;

&#x201C;rootaddr=10M rootsize=15M rw&#x201D;&#x5904;&#x5BF9;&#x5E94;&#x586B;&#x5165;rootfs.img&#x7684;&#x70E7;&#x5199;&#x8D77;&#x59CB;&#x4F4D;&#x7F6E;&#x4E0E;&#x957F;&#x5EA6;&#xFF0C;&#x6B64;&#x5904;&#x4E0E;IDE&#x4E2D;&#x65B0;&#x589E;rootfs.img&#x6587;&#x4EF6;&#x65F6;&#x6240;&#x586B;&#x5927;&#x5C0F;&#x5FC5;&#x987B;&#x76F8;&#x540C;&#x3002;

saveenv

//&#x8868;&#x793A;&#x4FDD;&#x5B58;&#x5F53;&#x524D;&#x914D;&#x7F6E;&#x3002;

reset

//&#x8868;&#x793A;&#x590D;&#x4F4D;&#x5355;&#x677F;&#x3002;
</pre>
<p>&#x952E;&#x76D8;&#x56DE;&#x8F66;&#xFF0C;&#x770B;&#x5230;&#x7EA2;&#x8272; OHOS#&#x5B57;&#x6837;&#xFF0C;&#x8BF4;&#x660E;&#x4F60;&#x90FD;&#x5F04;&#x5BF9;&#x4E86;&#xFF0C;&#x53EF;&#x4EE5;&#x5F00;&#x53D1;&#xFF01;<br>
&#x5426;&#x5219;&#xFF0C;&#x8FD4;&#x56DE;&#x8BE5;&#x6587;&#x6863;&#xFF0C;&#x7B2C;&#x4E8C;&#x6B65;&#x3010;&#x521B;&#x5EFA;&#x65B0;&#x5DE5;&#x7A0B; / &#x7F16;&#x8BD1;&#xFF08;&#x6DF1;&#x5751;&#x5F00;&#x59CB;&#xFF09;&#x3011;<br>
&#x795D;&#x4F60;&#x597D;&#x8FD0;</p>
<hr>
<h3 class="mume-header" id="5%E5%A6%82%E4%BD%95%E5%AE%89%E8%A3%85hap">5&#xB7;&#x5982;&#x4F55;&#x5B89;&#x88C5;hap</h3>

<p>&#x53BB;out&#x6587;&#x4EF6;&#x5939;&#x4E0B;&#x9762;&#x8BE5;&#x8DEF;&#x5F84;&#x628A; aa &amp; bm&#x6587;&#x4EF6;&#x62FF;&#x51FA;&#x6765;</p>
<pre class="language-text">/out/ipcamera_hi3516/dev_tools

aa &amp; bm&#x6587;&#x4EF6;&#x62FF;&#x51FA;&#x6765; copy&#x5230;SD&#x5361;
</pre>
<p>&#x518D;&#x628A;DevEco&#x5F00;&#x53D1;&#x7684;smart&#x7684;hap&#x5305;&#x653E;&#x8FDB;&#x53BB;&#x3002;</p>
<p>&#x6CE8;&#x610F;&#x4E8B;&#x9879;&#xFF08;&#x975E;&#x5E38;&#x91CD;&#x8981;&#xFF09;&#xFF1A;<br>
&#x8FD9;&#x91CC;&#x4EC5;&#x80FD;&#x4F7F;&#x7528;js&#x5F00;&#x53D1;&#xFF0C;&#x9879;&#x76EE;&#x7684;config.json&#x4E2D;&#x7684;&#x914D;&#x7F6E;&#x3002;</p>
<pre class="language-text">&quot;abilities&quot;: [
  {
    ...
    &quot;visible&quot;: true
    ...
  }
]
//&#x5FC5;&#x987B;&#x5C06; visible &#x5F00;&#x542F; &#xFF0C;&#x5426;&#x5219;&#x88C5;&#x4E0A;&#x8FD0;&#x884C;&#x4E0D;&#x4E86;
</pre>
<p>&#x5B89;&#x88C5;&#x65B9;&#x5F0F;&#xFF1A;</p>
<p>sd&#x63D2;&#x5165;&#x677F;&#x5B50;&#xFF0C;&#x4E32;&#x53E3;&#x542F;&#x52A8;&#x3002;&#x8FDB;&#x5165; OHOS# shell&#x6A21;&#x5F0F;&#xFF0C;&#x8F93;&#x5165;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x884C;</p>
<pre class="language-text">cd sdcard
ls //&#x770B;&#x6E05;&#x695A;&#x4F60;&#x7684;hap&#x5305;&#x540D;
./bm set -s disable //&#x64A4;&#x9500;&#x7B7E;&#x540D;&#x9A8C;&#x8BC1;
./bm set -d enable //&#x5F00;&#x542F;debug&#x5F00;&#x53D1;
./bm install -p xxxx.hap  //&#x5B89;&#x88C5;&#x4F60;&#x7684;&#x5305;
</pre>
<p>&#x81F3;&#x6B64;&#xFF0C;&#x4F60;&#x5B89;&#x88C5;&#x4E86;&#x4F60;&#x5F00;&#x53D1;&#x7684;&#x9E3F;&#x8499;&#x5E94;&#x7528;hap&#x5305;&#x5230;&#x4E86;&#x5F00;&#x53D1;&#x677F;3516</p>
<hr>
<h3 class="mume-header" id="6%E9%98%85%E8%AF%BB%E6%BA%90%E7%A0%81%E5%BC%80%E5%90%AFjs%E7%9A%84camera%E7%BB%84%E4%BB%B6">6&#xB7;&#x9605;&#x8BFB;&#x6E90;&#x7801;&#xFF0C;&#x5F00;&#x542F;js&#x7684;Camera&#x7EC4;&#x4EF6;&#xFF01;</h3>

<p>&#x6E90;&#x7801;&#x5730;&#x5740;&#xFF1A;<a href="https://gitee.com/openharmony/ace_lite_jsfwk">https://gitee.com/openharmony/ace_lite_jsfwk</a></p>
<p>&#x5BF9;&#x7167;&#x81EA;&#x5DF1;&#x6E90;&#x7801;&#x4F4D;&#x7F6E;&#xFF1A;foundation/ace/frameworks/lite/src/core/components/BUILD.gn</p>
<pre class="language-text">sources = [
    ...
    &quot;camera_component.cpp&quot;,
    ...
]
//&#x628A;camera&#x7EC4;&#x4EF6;&#x6302;&#x8FDB;&#x53BB;&#xFF0C;&#x7136;&#x540E;&#x5168;&#x90E8;&#x955C;&#x50CF;&#x91CD;&#x65B0;&#x7F16;&#x8BD1;&#x70E7;&#x5F55;
//&#x8986;&#x76D6;&#x73B0;&#x6709;out&#xFF0C;&#x70E7;&#x5F55;&#x8FD0;&#x884C;
</pre>
<p>js&#x524D;&#x7AEF;&#x9879;&#x76EE;&#x52A0;&#x5165; hml &#x6807;&#x7B7E; <camera></camera><br>
&#x6709;&#x62A5;&#x9519;&#xFF0C;&#x4E0D;&#x7406;<br>
&#x7EE7;&#x7EED;&#x7F16;&#x8BD1;<br>
&#x6253;&#x5305;hap&#xFF0C;&#x5B89;&#x88C5;<br>
&#x771F;&#x673A;&#x5B89;&#x88C5;&#x8FD0;&#x884C;&#xFF0C;&#x9ED1;&#x5C4F;&#xFF1F;<br>
&#x90A3;&#x662F;&#x7EBF;&#x7A0B;&#x4E2D;&#x6CA1;&#x6709;&#x6444;&#x50CF;&#x5934;&#x5F00;&#x542F;&#x7A0B;&#x5E8F;&#x3002;</p>
<p>&#x6CA1;&#x6709;&#x7A0B;&#x5E8F;&#xFF1F;<br>
&#x5B98;&#x65B9;&#x793A;&#x4F8B;&#xFF1A;<a href="https://device.harmonyos.com/cn/docs/develop/demo/oem_device_iotcamera_control_app-0000001055301733">https://device.harmonyos.com/cn/docs/develop/demo/oem_device_iotcamera_control_app-0000001055301733</a></p>
<p>&#x6309;&#x7167;&#x6587;&#x6863;&#xFF0C;&#x8FD0;&#x884C;&#x5373;&#x53EF;&#x3002;&#x4FDD;&#x6301;&#x4F60;&#x7684;hap&#x5F00;&#x542F;</p>
<p>&#x542F;&#x52A8;&#x793A;&#x4F8B;&#x7A0B;&#x5E8F;<br>
./camera_sample</p>
<hr>
<p>&#x5B8C;&#x7ED3;</p>

      </div>
      
      
    
    
    
    
    
    
    
    
  
    </body></html>